<template>
	<view class="goods_list" >
		<view class="goods_item" v-for="item in goods" :key="item.id" @click="navigator(item.id)">
			<image src="/static/1.webp"></image>
			<view class="p">
				<text>${{item.sell_price}}</text>
				<text>${{item.market_price}}</text>
			</view>
			<view class="name">{{item.title}}</view>
		</view>
	
	
	</view>
</template>

<script>

	export default {
		props:['goods'],
	data() {
			return {
				
			}
		},
		methods: {
			navigator (id) {
				this.$emit('goodsItemClick',id)
			}
			
		}
	}
</script>

<style >
.goods_list {

		justify-content: space-between;
		margin: 7rpx 0;
		padding: 0 15rpx;

	}

	.goods_list {
		display: flex;
		flex-wrap: wrap;
	}

	.goods_item {
		background: #fff;
		width: 355rpx;
		margin: 10rpx 0;
		padding: 15rpx 0;
		box-sizing: border-box;

	}

	.goods_item image {
		width: 80%;
		height: 150px;
		display: block;
		margin: auto;

	}

	.p {
		color: ##b50e03;
		font-size: 36rpx;

		
	}
	.p text:nth-child(2) {
			color: #ccc;
			font-size: 28rpx;
			margin-left: 17rpx;
			text-decoration: line-through;
		}

	.name {
		font-size: 28rpx;
		line-height: 50rpx;
		padding-bottom: 15rpx;
		padding-top: 10rpx;
	}
</style>
